// 2 3 5 6 8 11 14
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
    ll n;
    cin >> n;
    if (n == 2 || n == 3 || n == 5 || n == 6 || n == 8 || n == 11 || n == 14) {
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
    }
}
int main()
{
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}